<script setup>
function login() {
  localStorage.setItem("logged", true)
}

function logout() {
  localStorage.removeItem("logged")
}
</script>

<template>
<div>
  <button v-on:click="login">登录</button>
  <button v-on:click="logout">退出</button>
</div>
</template>

<style scoped>

</style>